<?php 


error_reporting(0);
header("Content-Type: text/html; charset=utf-8");
$v=$_GET["v"];
$uu = 'http://139.129.25.160:12135/api/i.php?token=3d4852ad2bf1293a3551a1beef0869e3&id='.$v.'&type=tudou&ctype=m';
$con = curl($uu);
$json = json_decode($con, 1);
extract($json);
//print_R($json);
$video = urlencode($m);
switch ($t) {
    case 'mp4':
        $abc = " f:'$m',
        s:'0',             
        c:'0',       
        p:'1'";
        break;

    case 'm3u8':
        $abc = "f:'https://m.1haza.com/player/Yunflv/letv-m3u8/m3u8.swf',
        a:'$video', 
        s:'4',             
        c:'0',       
        p:'1',  
        lv:0";
        break;
}

function curl($url, $Data = '') {
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, $url);
    curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
    curl_setopt($curl, CURLOPT_CONNECTTIMEOUT, 10);
    //curl_setopt ($curl, CURLOPT_REFERER, "http://music.163.com/");
    //curl_setopt($curl, CURLOPT_USERAGENT, "Mozilla/5.0 (iPhone; U; CPU iPhone OS 4_0 like Mac OS X; en-us) AppleWebKit/532.9 (KHTML, like Gecko) Version/4.0.5 Mobile/8A293 Safari/6531.22.7");
    $src = curl_exec($curl);
    curl_close($curl);
    return $src;
}
function jiami($key,$path,$overtime='10'){
$etime = time()+$overtime;
$sign = substr(md5($key.'&'.substr($etime,'7','3').'&'.$path), 12,8).$etime;
return $sign;
}
?>

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Yunflv</title>
<style type="text/css">
*{margin:0;padding:0;}

</style>
</head>
<body>
<div id="a1"></div>
<script type="text/javascript" src="https://m.1haza.com/player/Yunflv/ckplayer/ckplayer.js" charset="utf-8"></script>
<script type="text/javascript">
var flashvars={     
<?php echo $abc ?>
        };
    var params={bgcolor:'#FFF',allowFullScreen:true,allowScriptAccess:'always'};
    var video=['<?php echo $m ?>'];
    CKobject.embed('https://m.1haza.com/player/Yunflv/ckplayer/ckplayer.swf','a1','ckplayer_a1','100%','230',false,flashvars,video,params);
    
</script>
</body>
</html>